package com.oot2d.event;

import com.oot2d.util.Timer;

public class DelayEvent implements Event {
    long duration;
    private Timer timer;

    public DelayEvent(long d)
    {
        duration = d;
    }

    public void exec()
    {
        timer = EventManager.addTimer(duration);
    }

    public boolean isDone()
    {
        if (timer.isDone()) {
            EventManager.removeTimer(timer);
            return true;
        }

        return false;
    }
}
